﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/MasterPagePrivate.master" AutoEventWireup="true" CodeFile="ContentList.aspx.cs" Inherits="Pages_Admin_ContentList" %>
<%@ Register Src="~/UserControls/DataTableList.ascx" TagName="DataTableList" TagPrefix="UC" %>
<%@ Register Src="~/UserControls/Pager.ascx" TagName="Pager" TagPrefix="UC" %>

<asp:Content ID="Content1" ContentPlaceHolderID="PageHeader" Runat="Server">
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="PageBody" Runat="Server">
    <h4 id="h4Heding" runat="server">Content List</h4>    
    <div id="divMessage" runat="server" visible="false" enableviewstate="false"></div>    
    <div>
        <a href="/Pages/Admin/ContentChange.aspx">Add New Content</a>
    </div>
    <div class="ListingContainer">        
        <%--<UC:DataTableList id="ucContentList" runat="server"
            ExcludeVisibleFields="ID, TotalRecord, Summery" LinkFields="ID" 
            CheckForDeletePermission="False"></UC:DataTableList>--%>
        <asp:Repeater ID="rptContentList" runat="server">
            <HeaderTemplate>
                <table class="GridView" cellpadding="3" cellspacing="0">
                    <colgroup>
                        <col style="width:12%;" />
                        <col style="width:50%;" />
                        <col style="width:20%;" />
                        <col style="width:10%;" />
                        <col />
                    </colgroup>
                    <tr>
                        <th style="text-align:center;">Content ID</th>
                        <th>Title</th>
                        <th>Modified</th>
                        <th>Preview</th>
                        <th style="text-align:center;">Action</th>
                    </tr>
            </HeaderTemplate>
            <ItemTemplate>
                <tr class="OddRowListing">
                    <td style="text-align:center;"><%# WebUtil.FormatData(DataBinder.Eval(Container.DataItem, "ID")) %></td>
                    <td><%# WebUtil.FormatData(DataBinder.Eval(Container.DataItem, "Title")) %></td>
                    <td><%# WebUtil.FormatData(DataBinder.Eval(Container.DataItem, "Modified")) %></td>
                    <td><a href="/Pages/Public/ShowContent.aspx?ID=<%# WebUtil.FormatData(DataBinder.Eval(Container.DataItem, "ID")) %>" target="_blank">Preview</a></td>
                    <td style="text-align:center;"><a href="/Pages/Admin/ContentChange.aspx?ID=<%# WebUtil.FormatData(DataBinder.Eval(Container.DataItem, "ID")) %>">Edit</a></td>
                </tr>                    
            </ItemTemplate>
            <AlternatingItemTemplate>
                <tr class="EvenRowListing">
                    <td style="text-align:center;"><%# WebUtil.FormatData(DataBinder.Eval(Container.DataItem, "ID")) %></td>
                    <td><%# WebUtil.FormatData(DataBinder.Eval(Container.DataItem, "Title")) %></td>
                    <td><%# WebUtil.FormatData(DataBinder.Eval(Container.DataItem, "Modified")) %></td>
                    <td><a href="/Pages/Public/ShowContent.aspx?ID=<%# WebUtil.FormatData(DataBinder.Eval(Container.DataItem, "ID")) %>" target="_blank">Preview</a></td>
                    <td style="text-align:center;"><a href="/Pages/Admin/ContentChange.aspx?ID=<%# WebUtil.FormatData(DataBinder.Eval(Container.DataItem, "ID")) %>">Edit</a></td>
                </tr>                    
            </AlternatingItemTemplate>
            <FooterTemplate>
                </table>
            </FooterTemplate>
        </asp:Repeater>
        <div style="margin-top:10px;">
            <UC:Pager ID="ucContentListPager" runat="server" OnPageIndexChanged="ucContentListPager_PageIndexChanged" />
        </div>
    </div>
</asp:Content>

